//
//  DWDStatusBottomView.swift
//  dwdWb
//
//  Created by Dengdwd on 15/10/12.
//  Copyright © 2015年 dwd. All rights reserved.
//

import UIKit

class DWDStatusBottomView: UIView {

    var statusModel:DWDStatusModel?{
        didSet{
//            setUpBtn()
        }
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame) 
        setUpUI()
    }
//    private func setUpBtn() {
//        let count = statusModel?.status.reposts_count

//    }
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private func setUpUI() {
        // 设置背景颜色
        backgroundColor = UIColor(white: 0.95, alpha: 1.0)
        
        addSubview(forwardButton)
        addSubview(commonButton)
        addSubview(likeButton)
        addSubview(firstLine)
        addSubview(secondLine)
        let w = SCREENW / 3.0
        ff_HorizontalTile([forwardButton, commonButton, likeButton], insets: UIEdgeInsetsZero)
        firstLine.ff_AlignHorizontal(type: ff_AlignType.TopLeft, referView: self, size: CGSize(width: 1, height: 30), offset:CGPoint(x: w, y: 7))
        secondLine.ff_AlignHorizontal(type: ff_AlignType.TopLeft, referView: firstLine, size: CGSize(width: 1, height: 30), offset: CGPoint(x: w, y: 0))
        
    }
    
    // MARK: 懒加载控件
    private lazy var forwardButton: UIButton = UIButton(title: " 转发", imageName: "timeline_icon_retweet", color: UIColor.darkGrayColor(), fontSize: 12)
    private lazy var commonButton: UIButton = UIButton(title: " 评论", imageName: "timeline_icon_comment", color: UIColor.darkGrayColor(), fontSize: 12)
    private lazy var likeButton: UIButton = UIButton(title: " 赞", imageName: "timeline_icon_unlike", color: UIColor.darkGrayColor(), fontSize: 12)
    
    private lazy var firstLine: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.lightGrayColor()
        return view
        }()
    private lazy var secondLine:UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.lightGrayColor()
        return view
        }()

}
